<template>
	<view class="homebox">
		<!-- 		<view class="czname">
			测站信息
		</view> -->
		<!-- 断面列表 -->
		<u-sticky>
			<view class="che_box" hover-class="che_box_av" @click="cheshowFn">
				点击添加断面参数
			</view>
		</u-sticky>
		<view class="box_lo">
			<view class="hetop_box">
				<view class="hetop">
					<view class="titleclass">
						测段信息
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						所属部门：
					</view>
					<view class="leboxinput">
						<view class="">
							{{cezhanitem.deptName}}
							<!-- <uni-easyinput :clearable="false" v-model="cezhanitem.deptName" placeholder="请输入内容"></uni-easyinput> -->
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						所在渠道：
					</view>
					<view class="">
						<view class="">
							{{cezhanitem.canalName}}
							<!-- <uni-easyinput :clearable="false" v-model="cezhanitem.canalName" placeholder="请输入内容"></uni-easyinput> -->
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						所在测站：
					</view>
					<view class="">
						<view class="">
							{{cezhanitem.surveyStationName}}
							<!-- <uni-easyinput :clearable="false" v-model="cezhanitem.surveyStationName" placeholder="请输入内容"></uni-easyinput> -->
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						测段名称：
					</view>
					<view class="">
						<view class="">
							{{cezhanitem.ceduanName}}
							<!-- <uni-easyinput :clearable="false" v-model="cezhanitem.ceduanName" placeholder="请输入内容"></uni-easyinput> -->
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						测段编号：
					</view>
					<view class="">
						<view class="">
							{{cezhanitem.code}}
							<!-- <uni-easyinput :clearable="false" v-model="cezhanitem.code" placeholder="请输入内容"></uni-easyinput> -->
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						经度：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.lot" type='digit'
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						纬度：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.lat" type='digit'
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="button">
					<u-button type="success" shape="circle" text="点击获取经纬度" @click="loalonFn"></u-button>
				</view>
			</view>
			<view class="hetop_box">
				<view class="hetop">
					<view class="titleclass">
						测段参数
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						断面形式：
					</view>
					<view class="leboxinput">
						<view class="">
							<uni-data-checkbox v-model="cezhanitem.xingzhuang" :localdata="rangexiangzhuang"
								mode="tag"></uni-data-checkbox>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						渠道底宽：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.qudikuandu"
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="titbox">
					边坡角度
				</view>
				<view class="czinput">
					<view class="lebox">
						起测边：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.startingEdge"
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						结束边：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.endEdge"
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="titbox">
					岸边系数
				</view>
				<view class="czinput">
					<view class="lebox">
						起测岸：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.raisedShore"
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						结束岸：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.endingShore"
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="titbox">
					水位流量关系曲线：(Q=Kh^n)
				</view>
				<view class="czinput">
					<view class="lebox">
						K：
					</view>
					<view class="">
						<view class="">
							{{cezhanitem.k}}
							<!-- <uni-easyinput :clearable="false" v-model="cezhanitem.k" placeholder="请输入内容"></uni-easyinput> -->
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						n：
					</view>
					<view class="">
						<view class="">
							{{cezhanitem.n}}
							<!-- <uni-easyinput :clearable="false" v-model="cezhanitem.n" placeholder="请输入内容"></uni-easyinput> -->
						</view>
					</view>
				</view>
			</view>
			<view class="hetop_box">
				<view class="hetop">
					<view class="titleclass">
						测控参数
					</view>
				</view>
				<view class="titbox">
					流速仪距渠底的高度
				</view>
				<view class="czinput">
					<view class="lebox">
						测线条数：
					</view>
					<view class="">
						{{cezhanitem.cexiantiaoshu}}
						<!-- 						<view class="" style="width: 350rpx;">
							<uni-data-select :clear="false" v-model="cezhanitem" :localdata="range1"
								placeholder="请选择测线条数" @change="change1"></uni-data-select>
						</view> -->
					</view>
				</view>
				<scroll-view scroll-x="true" class="scroll-view_H">
					<view class="qicebox">
						<view class="qicedian qicinone">
							测线
						</view>
						<view class="qicedian">
							坐标
						</view>
						<view class="qicedian">
							测流杆
						</view>
						<view class="qicedian">
							轨道车
						</view>
						<view class="qicedian">
							索道车
						</view>
						<view class="qicedian">
							多普勒车
						</view>
					</view>
					<view class="qicebox" v-for="(i,index) in cezhanitem.underwaterPenetrationConfig.cexianList"
						:key="index">
						<view class="qicinput qicinone">
							{{i.id}}
						</view>
						<view class="qicinput">
							<!-- {{i.cR}} -->
							<u--input v-model="i.cR" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
						<view class="qicinput">
							<!-- {{i.celiugan}} -->
							<u--input v-model="i.celiugan" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
						<view class="qicinput">
							<!-- {{i.guidaoche}} -->
							<u--input v-model="i.guidaoche" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
						<view class="qicinput">
							<!-- {{i.suodaoche}} -->
							<u--input v-model="i.suodaoche" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
						<view class="qicinput">
							<!-- {{i.duopuleche}} -->
							<u--input v-model="i.duopuleche" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
					</view>
				</scroll-view>
				<view class="titbox">
					基准点距流速仪的高度
				</view>
				<scroll-view scroll-x="true" class="scroll-view_H">
					<view class="qicebox">
						<view class="qicedian jizhunqiany">
							名称
						</view>
						<view class="qicedian jizhunqiany">
							基准点位置
						</view>
						<view class="qicedian jizhunqiany">
							流速仪高度
						</view>
						<view class="qicedian jizhunqiany">
							距铅鱼底
						</view>
					</view>
					<view class="qicebox" v-for="(i,index) in cezhanitem.underwaterPenetrationConfig.datumMarkList"
						:key="index">
						<view class="qicinput jizhunqiany">
							{{i.type}}
						</view>
						<view class="qicinput jizhunqiany">
							{{i.datumMark}}
							<!-- <u--input v-model="i.datumMark" placeholder="输入内容" border="none"></u--input> -->
						</view>
						<view class="qicinput jizhunqiany">
							{{i.liusuyiHeight}}
							<!-- <u--input v-model="i.liusuyiHeight" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput jizhunqiany">
							{{i.lsydqydData}}
							<!-- <u--input v-model="i.lsydqydData" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
					</view>
				</scroll-view>
				<!-- 				<view class="czinput">
					<view class="lebox">
						基准点位置：
					</view>
					<view class="">
						<view class="" style="width: 350rpx;">
							<uni-data-select :clear="false" v-model="jizhundianValue" :localdata="jizhundianList"
								placeholder="请选择"></uni-data-select>
						</view>
					</view>
				</view> -->
				<!-- 				<view class="czinput">
					<view class="lebox">
						流速仪高度：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false" v-model="cezhanitem.nub" placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view> -->
				<view class="titbox">
					起始点到测线的行走距离
				</view>
				<scroll-view scroll-x="true" class="scroll-view_H">
					<view class="qicebox">
						<view class="qicedian xingzoujl">
							测线
						</view>
						<view class="qicedian xingzoujl">
							坐标
						</view>
						<view class="qicedian xingzoujl">
							轨道车
						</view>
						<view class="qicedian xingzoujl">
							索道车
						</view>
						<view class="qicedian xingzoujl">
							多普勒车
						</view>
					</view>
					<view class="qicebox" v-for="(item,index) in cezhanitem.horizontalWalkConfig.cexianList"
						:key="index">
						<view class="qicinput xingzoujl">
							{{item.id}}
						</view>
						<view class="qicinput xingzoujl">
							<!-- {{item.cR}} -->
							<u--input v-model="item.cR" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
						<view class="qicinput xingzoujl">
							<!-- {{item.guidaoche}} -->
							<u--input v-model="item.guidaoche" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
						<view class="qicinput xingzoujl">
							<!-- {{item.suodaoche}} -->
							<u--input v-model="item.suodaoche" placeholder="输入内容" border="none" type="digit"></u--input>
						</view>
						<view class="qicinput xingzoujl">
							<!-- {{item.duopuleche}} -->
							<u--input v-model="item.duopuleche" placeholder="输入内容" border="none"
								type="digit"></u--input>
						</view>
					</view>
				</scroll-view>
				<!-- 				<view class="czinput">
					<view class="lebox">
						起始点位置：
					</view>
					<view class="">
						<view class="" style="width: 350rpx;">
							<uni-data-select :clear="false" v-model="qishidianValue" :localdata="qishidianList"
								placeholder="请选择"></uni-data-select>
						</view>
					</view>
				</view> -->
				<view class="titbox">
					水面测流流速系数
				</view>
				<view class="czinput">
					<view class="lebox">
						水深限值1：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false"
								v-model="cezhanitem.surfaceVelocityCoefficient.depthRangeStart" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						水深限值2：
					</view>
					<view class="">
						<view class="">
							<uni-easyinput :clearable="false"
								v-model="cezhanitem.surfaceVelocityCoefficient.depthRangeEnd" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="titbox titfosi">
					低水位时系数：（＜限值1）
				</view>
				<scroll-view scroll-x="true" class="scroll-view_H">
					<view class="qicebox">
						<view class="qicedian qicinone">
							测线
						</view>
						<view class="qicedian">
							坐标
						</view>
						<view class="qicedian">
							多普勒A
						</view>
						<view class="qicedian">
							多普勒C
						</view>
						<view class="qicedian">
							雷达波
						</view>
						<view class="qicedian">
							浮标
						</view>
					</view>
					<view class="qicebox" v-for="(item,index) in cezhanitem.surfaceVelocityCoefficient.dishuiwei"
						:key="index">
						<view class="qicinput qicinone">
							{{item.id}}
						</view>
						<view class="qicinput">
							{{item.cR}}
							<!-- <u--input v-model="item.cR" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.duopulecheA}}
							<!-- <u--input v-model="item.duopulecheA" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.duopulecheC}}
							<!-- <u--input v-model="item.duopulecheC" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.leidabo}}
							<!-- <u--input v-model="item.leidabo" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.fubiao}}
							<!-- <u--input v-model="item.fubiao" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
					</view>
				</scroll-view>
				<view class="titbox titfosi">
					中水位时系数：（≥限值1，≤限值2）
				</view>
				<scroll-view scroll-x="true" class="scroll-view_H">
					<view class="qicebox">
						<view class="qicedian qicinone">
							测线
						</view>
						<view class="qicedian">
							坐标
						</view>
						<view class="qicedian">
							多普勒A
						</view>
						<view class="qicedian">
							多普勒C
						</view>
						<view class="qicedian">
							雷达波
						</view>
						<view class="qicedian">
							浮标
						</view>
					</view>
					<view class="qicebox" v-for="(item,index) in cezhanitem.surfaceVelocityCoefficient.zhongshuiwei"
						:key="index">
						<view class="qicinput qicinone">
							{{item.id}}
						</view>
						<view class="qicinput">
							{{item.cR}}
							<!-- <u--input v-model="item.cR" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.duopulecheA}}
							<!-- <u--input v-model="item.duopulecheA" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.duopulecheC}}
							<!-- <u--input v-model="item.duopulecheC" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.leidabo}}
							<!-- <u--input v-model="item.leidabo" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.fubiao}}
							<!-- <u--input v-model="item.fubiao" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
					</view>
				</scroll-view>
				<view class="titbox titfosi">
					高水位时系数：（＞限值2）
				</view>
				<scroll-view scroll-x="true" class="scroll-view_H">
					<view class="qicebox">
						<view class="qicedian qicinone">
							测线
						</view>
						<view class="qicedian">
							坐标
						</view>
						<view class="qicedian">
							多普勒A
						</view>
						<view class="qicedian">
							多普勒C
						</view>
						<view class="qicedian">
							雷达波
						</view>
						<view class="qicedian">
							浮标
						</view>
					</view>
					<view class="qicebox" v-for="(item,index) in cezhanitem.surfaceVelocityCoefficient.gaoshuiwei"
						:key="index">
						<view class="qicinput qicinone">
							{{item.id}}
						</view>
						<view class="qicinput">
							{{item.cR}}
							<!-- <u--input v-model="item.cR" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.duopulecheA}}
							<!-- <u--input v-model="item.duopulecheA" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.duopulecheC}}
							<!-- <u--input v-model="item.duopulecheC" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.leidabo}}
							<!-- <u--input v-model="item.leidabo" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput">
							{{item.fubiao}}
							<!-- <u--input v-model="item.fubiao" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
					</view>
				</scroll-view>
				<view class="titbox titfosi">
					流速仪信号均匀度限值
				</view>
				<scroll-view scroll-x="true" class="scroll-view_H">
					<view class="qicebox">
						<view class="qicedian junydu">
							测线
						</view>
						<view class="qicedian junydu">
							坐标
						</view>
						<view class="qicedian junydu">
							A均
						</view>
						<view class="qicedian junydu">
							B均
						</view>
						<view class="qicedian junydu">
							C均
						</view>
					</view>
					<view class="qicebox" v-for="(item,index) in cezhanitem.automationFlowGaging" :key="index">
						<view class="qicinput junydu">
							{{item.id}}
						</view>
						<view class="qicinput junydu">
							{{item.cR}}
							<!-- <u--input v-model="item.cR" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput junydu">
							{{item.aUniformity}}
							<!-- <u--input v-model="item.aUniformity" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput junydu">
							{{item.bUniformity}}
							<!-- <u--input v-model="item.bUniformity" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
						<view class="qicinput junydu">
							{{item.cUniformity}}
							<!-- <u--input v-model="item.cUniformity" placeholder="输入内容" border="none" type="digit"></u--input> -->
						</view>
					</view>
				</scroll-view>
			</view>
			<view class="hetop_box">
				<view class="hetop">
					<view class="titleclass">
						设计参数
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						设计水深：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.shejishuishen" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						设计流量：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.shejiliuliang" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m³/s</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						加大水深：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.jiadashuishen" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						加大流量：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.jiadaliuliang" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m³/s</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						渠底纵坡：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.qudizongpo" placeholder="请输入内容">
								<template #left>
									<view style="margin-left: 20rpx;"> 1 ：</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						糙率：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.qupocaolv"
								placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						上限预警水位：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.shangxianshuiwei" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						下限预警水位：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.xiaxianshuiwei" placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						下限失效水位：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.xiaxianshixiaoshuiwei"
								placeholder="请输入内容">
								<template #right>
									<view style="margin-right: 10rpx;">m</view>
								</template>
							</uni-easyinput>
						</view>
					</view>
				</view>
			</view>
			<!-- <view class="hetop_box">
				<view class="hetop">
					<view class="titleclass">
						数据上传参数
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						服务器地址：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.nub" placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						端口：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.nub" placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						测段ID：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.nub" placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						密钥：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.nub" placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						用户名：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.nub" placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
				<view class="czinput">
					<view class="lebox">
						密码：
					</view>
					<view class="">
						<view class="inputtext">
							<uni-easyinput :clearable="false" v-model="cezhanitem.nub" placeholder="请输入内容"></uni-easyinput>
						</view>
					</view>
				</view>
			</view> -->

			<view class="" style="height: 100rpx;">
				<u-button @click="saveCezhan" type="primary" shape="circle" text="保存到本地"></u-button>
			</view>
			<view class="" style="height: 100rpx;">

			</view>
		</view>
		<!-- 抽屉断面信息列表 -->
		<uni-drawer ref="showRight" mode="left" :mask-click="false" :width="360" maskClick>
			<scroll-view style="height: 100%;" scroll-y="true">
				<view class="">
					<!-- 标题 -->
					<view class="title_box">
						<view class="bode"></view>
						<view class="text">
							选择类型：
						</view>
					</view>
					<!-- 数据内容 -->
					<view class="dataContent">
						<button-checkbox :list="leixRange" mode="single" :value="leixValue" @change="leixchange" />
					</view>

					<!-- 标题 -->
					<view class="title_box">
						<view class="bode"></view>
						<view class="text">
							测站
						</view>
					</view>
					<!-- 数据内容 -->
					<view class="dataContent">
						<button-checkbox :list="cheZhanRange" mode="single" :value="cheZhanValue"
							@change="cheZHANchange" />
					</view>

					<!-- 标题 -->
					<view class="title_box">
						<view class="bode"></view>
						<view class="text">
							{{cezhanleix}}
						</view>
					</view>
					<!-- 数据内容 -->
					<view class="dataContent">
						<button-checkbox :list="cheDuanRange" mode="single" :value="cheDuanValue"
							@change="cheDUANchange" />
					</view>

					<!-- 标题 -->
					<view class="title_box">
						<view class="bode"></view>
						<view class="text">
							选择断面参数
						</view>
					</view>

					<view class="" style="display: flex;align-items: center;margin-top: 30rpx;" v-for="(i,index) in duanMianList"
						:key="index">
						<!-- 						<view class="con_list" hover-class="con_list_av" @click="duanMianFn(i.id)">
							<view class="con_a">
								{{i.name}}
							</view>
							<view class="con_f">
								<view class="">
									<view class="con_b">
										{{i.cexiantiaoshu}}条测线
									</view>
								</view>
								<u-icon name="arrow-right" color="#b8b8b8"></u-icon>
							</view>
						</view> -->

						<uni-swipe-action-item :right-options="options" :autoClose="true" @click="onClick($event,i.id)"
							@change="change">
							<view class="con_list" hover-class="con_list_av" @click="duanMianFn(i.id)">
								<view class="con_a">
									{{i.name}}
								</view>
								<view class="con_b">
									<text style="margin-left: 20rpx;">{{i.cexiantiaoshu}}条测线</text>
									<u-icon name="arrow-right" color="#ffffff"></u-icon>
								</view>
							</view>
						</uni-swipe-action-item>
						<!-- 						<view class="con_butt">
							<u-button type="warning" text="修改"></u-button>
						</view> -->

					</view>
					<!-- 确定 -->
					<view class="" style="padding: 20rpx;margin-top: 30rpx;" v-show="createName != ''">
						<u-button @click="createANewDuanMian" type="success" shape="circle" color="#00aa7f"
							text="创建新断面参数"></u-button>
					</view>
					<view class="" style="padding: 20rpx;">
						<u-button @click="closeDrawer" type="success" shape="circle" color="#33498d"
							text="取消"></u-button>
					</view>
				</view>
			</scroll-view>
		</uni-drawer>
		<u-modal showCancelButton :show="delelisIF" title="是否删除" @confirm="confidelelisIFn" @cancel="cancedelelisIF"></u-modal>
	</view>
</template>

<script>
	// 引入外部 JS 文件
	import processingDataFormat from '@/utils/processingDataFormat.js';
	import CustomTable from '@/components/CustomTable.vue';
	import ButtonCheckbox from '@/components/ButtonCheckbox.vue';
	export default {
		components: {
			ButtonCheckbox,
			CustomTable
		},
		data() {
			return {
				delelisIF:false,
				options: [{
					text: '修改',
					style: {
						color:'#000',
						backgroundColor: '#ffea02'
					}
				}, {
					text: '删除',
					style: {
						color:'#000',
						backgroundColor: '#ff6262'
					}
				}],
				qishidianValue: null,
				qishidianList: [{
					text: '充电位',
					value: 0
				}, {
					text: '标识点',
					value: 1
				}, {
					text: '停止位',
					value: 2
				}],
				jizhundianValue: null,
				jizhundianList: [{
					text: '桥面',
					value: 0
				}, {
					text: '轨道面',
					value: 1
				}, {
					text: '铅鱼底',
					value: 2
				}],
				cezhanleix: '选择测段',
				styValue: 0,
				leixValue: null,
				leixRange: [{
					label: '测站',
					value: 0
				}, {
					label: '灌溉站',
					value: 1
				}],
				duanMianList: [],
				cheZhanValue: 0,
				cheZhanRange: [],
				cheDuanValue: 0,
				cheDuanRange: [],
				cheshow: false,
				cezhanitem: {
					underwaterPenetrationConfig: {
						cexianList: []
					},
					horizontalWalkConfig: {
						cexianList: []
					},
					surfaceVelocityCoefficient: {

					}
				},
				rangexiangzhuang: [{
					text: '梯形',
					value: 0
				}, {
					text: '矩形',
					value: 1
				}, ],
				range1: [{
						text: '1条测线',
						value: 1
					},
					{
						text: '2条测线',
						value: 2
					},
					{
						text: '3条测线',
						value: 3
					},
					{
						text: '4条测线',
						value: 4
					},
					{
						text: '5条测线',
						value: 5
					},
					{
						text: '6条测线',
						value: 6
					},
					{
						text: '7条测线',
						value: 7
					},
					{
						text: '8条测线',
						value: 8
					},
					{
						text: '9条测线',
						value: 9
					},
				],
				range2: [{
						text: '均匀',
						value: 1
					},
					{
						text: '不均匀',
						value: 2
					}
				],
				range3: [{
						text: '一点法',
						value: 1
					},
					{
						text: '三点法',
						value: 3
					}
				],
				devId: '',
				createASection: {}, //添加断面参数
				createName: '' ,//添加断面名称
				deleID:null, //删除id
			}
		},
		onLoad(option) {
			// 打开断面参数
		},
		onShow() {
			setTimeout(() => {
				this.$refs.showRight.open()
			}, 200)

		},
		methods: {
			// 删除
			confidelelisIFn(){
				this.handleDelete(this.deleID)
				this.delelisIF = false
			},
			cancedelelisIF(){
				this.delelisIF = false
			},
			// 删除
			handleDelete(id) {
				uni.$u.http.delete('/device/gagingSectionParameters/deletePhone/'+ id).then(res => {
					console.log(res);
					if (res.code == 200) {
						uni.showToast({
							title: '删除成功',
							icon: 'none'
						})
						this.$refs.showRight.close();
					}
				}).catch(err => {
					this.toastFn(res.msg)
					uni.redirectTo({
						url: '/pages/login'
					});
					console.log('错误', err);
				})
			},
			// 滑动
			onClick(e,id) {
				if(e.content.text == '删除'){
					this.delelisIF = true
					this.deleID = id
					console.log('点击了' + e.content.text + '按钮'+ ' --- ' + id)
				}else{
					uni.showToast({
						title: '暂未开放',
						duration: 1500
					});
				}
				
			},
			change(event) {
				console.log('改变事件', event);
			},
			swipeChange(e, index) {
				console.log('当前状态：' + e + '，下标：' + index)
			},
			// 选择类型
			leixchange(e) {
				this.createName = ''
				console.log('类型', e);
				this.leixValue = e.value
				this.cezhanListFn()
			},
			// 选择类型测站
			cezhanListFn(e) {
				uni.$u.http.get('/device/survey_station/list', {
					params: {
						"stationType": this.leixValue
					}
				}).then(res => {
					console.log('res测站', res);
					if (res.code == 200) {
						if (this.leixValue == 0) {
							this.cezhanleix = '选择测段'
						} else {
							this.cezhanleix = '选择计量点'
						}
						this.cheZhanRange = res.rows.map((i) => {
							return {
								value: i.id,
								label: i.surveyStationName,
							}
						})
					}
				}).catch(err => {
					console.log('错误', err);
				})
			},
			// 选择测站
			cheZHANchange(e) {
				console.log('测站', e);
				// 测段
				if (this.leixValue == 0) {
					this.ceduanListFn(e.value)
				}
				// 计量点
				if (this.leixValue == 1) {
					this.jiliangdListFn(e.value)
				}
			},
			// 测站列表
			ceduanListFn(id) {
				uni.$u.http.get('/device/steadyFlowSection/list', {
					params: {
						"ssId": id
					}
				}).then(res => {
					console.log('res测站', res);
					if (res.code == 200) {
						this.cheDuanRange = res.rows.map((i) => {
							return {
								value: i.id,
								label: i.name,
								ssId: i.ssId,
								wcId: i.wcId
							}
						})
					}
				}).catch(err => {
					console.log('错误', err);
				})
			},
			// 计量点列表
			jiliangdListFn(id) {
				uni.$u.http.get('/device/flowMeteringPoint/list', {
					params: {
						"ssId": id
					}
				}).then(res => {
					console.log('res计量点', res);
					if (res.code == 200) {
						this.cheDuanRange = res.rows.map((i) => {
							return {
								value: i.id,
								label: i.name,
								ssId: i.ssId,
								wcId: i.wcId
							}
						})
					}
				}).catch(err => {
					console.log('错误', err);
				})
			},
			// 选择测段或者计量点
			cheDUANchange(e) {
				console.log('ee测段', e);
				this.createName = e.label
				if (this.leixValue == 0) {
					let ceduanObj = {
						ssId: e.ssId,
						type: 0,
						sfsId: e.value,
						wcId: e.wcId
					}
					console.log('测段');
					this.duanMianTypeFnAA(ceduanObj)
				}
				if (this.leixValue == 1) {
					let jiliangdianObj = {
						ssId: e.ssId,
						type: 1,
						fmpId: e.value,
						wcId: e.wcId
					}
					console.log('计量点');
					this.duanMianTypeFnAA(jiliangdianObj)
				}

			},
			// 断面参数列表---测站计量点
			duanMianTypeFnAA(obj) {
				this.createASection = obj
				console.log('obj测站计量点', obj);
				uni.$u.http.get('/device/gagingSectionParameters/list', {
					params: obj
				}).then(res => {
					console.log('res++断面参数列表---测站', res);
					if (res.code == 200) {
						this.duanMianList = res.rows.map((i) => {
							return {
								name: i.ceduanName,
								cexiantiaoshu: i.cexiantiaoshu,
								id: i.id
							}
						})
					}
				}).catch(err => {
					console.log('错误', err);
				})
			},
			// 选择断面参数
			duanMianFn(id) {
				this.getInfoFn(id)
				uni.showLoading({
					title: '加载中'
				});
				setTimeout(function() {
					uni.hideLoading();
				}, 2500);
			},
			//断面信息详情
			getInfoFn(id) {
				console.log('id', id);
				uni.$u.http.get('/device/gagingSectionParameters/getInfo/' + id).then(res => {
					console.log('详情', res);
					if (res.code == 200) {
						let obj = res.data
						obj.lineCoordinates = JSON.parse(obj.lineCoordinates)
						obj.underwaterPenetrationConfig = JSON.parse(obj.underwaterPenetrationConfig)
						obj.horizontalWalkConfig = JSON.parse(obj.horizontalWalkConfig)
						obj.surfaceVelocityCoefficient = JSON.parse(obj.surfaceVelocityCoefficient)
						obj.automationFlowGaging = JSON.parse(obj.automationFlowGaging)
						// let arrStr = JSON.parse(str)
						console.log('断面-----', obj);
						this.cezhanitem = obj
						// 取消
						setTimeout(() => {
							this.loalonFn()
							this.closeDrawer()
						}, 0)
					}
				}).catch(err => {
					uni.showToast({
						title: '未查询到数据',
						duration: 1500
					});
					console.log('错误', err);
				})
			},
			// 选择断面
			cheshowFn() {
				// this.cheshow = true
				this.duanMianList = []
				this.$refs.showRight.open()
			},
			// 取消
			closeDrawer() {
				this.$refs.showRight.close();
				this.cheZhanValue = 0
				this.cheDuanValue = 0
				this.styValue = 0
				uni.hideLoading();
			},
			// 创建新断面参数
			createANewDuanMian() {
				// if(true){
				// 	uni.showToast({
				// 		title: '暂未开放',
				// 		duration: 1500
				// 	});
				// 	return
				// }

				let obj = this.createASection
				if (obj.type == 1) {
					obj.sfsId = null
					obj.stationType = 1
				} else if (obj.type == 0) {
					obj.fmpId = null
					obj.stationType = 0
				}
				obj.name = this.createName
				// 创建断面
				console.log('创建断面', obj);

				uni.navigateTo({
					url: '/pages/channel/createDuanMian?name=' + obj.name + '&ssId=' + obj.ssId + '&type=' + obj
						.type + '&sfsId=' + obj.sfsId + '&fmpId=' + obj.fmpId + '&stationType=' + obj.stationType +
						'&wcId=' + obj.wcId
				});

			},
			loalonFn() {
				uni.getLocation({
					type: 'wgs84',
					success: (res) => {
						this.cezhanitem.lot = res.longitude
						this.cezhanitem.lat = res.latitude
						console.log('当前位置的经度：' + res.longitude);
						console.log('当前位置的纬度：' + res.latitude);
					}
				});

			},
			// 选择测线
			change1(e) {
				this.cezhanitem.cexiantiaoshu = e
				this.cezhanitem.measurementModeList[1].value.length = 0
				for (var i = 0; i < e; i++) {
					this.cezhanitem.measurementModeList[1].value.push({
						id: 1 + i,
						cR: '',
						zJ: '',
						bC: ''
					})
				}
			},

			// 保存测站信息
			saveCezhan() {
				// if (this.cezhanitem.cexiantiaoshu == 0) {
				// 	uni.showToast({
				// 		title: '未选择测线',
				// 		duration: 1500
				// 	});
				// 	return
				// }
				let date = Date.parse(new Date())
				this.cezhanitem.cezhanID = date
				console.log('保存', this.cezhanitem);

				let obj = processingDataFormat.calculatedData(this.cezhanitem);

				let datalist = []
				datalist = this.vuex_saveCezhandata
				datalist.unshift(obj)
				uni.$u.vuex('vuex_saveCezhandata', datalist)
				uni.navigateBack({
					delta: 1
				});
			}
		}
	}
</script>
<style scoped lang="scss">
	// 测站数据内容
	.dataContent {
		padding: 0rpx 30rpx 0rpx 25rpx;
	}

	.title_box {
		font-size: 40rpx;
		font-weight: bold;
		display: flex;
		align-items: center;
		margin: 30rpx 0 10rpx 30rpx;
		border-bottom: rgba(106, 113, 138, 0.1) solid 1rpx;
		color: #4d6fd5;

		.bode {
			width: 10rpx;
			height: 40rpx;
			border-radius: 50rpx;
			background-color: #4d6fd5;
		}

		.text {
			padding: 5rpx 20rpx;
		}
	}

	.con_list {
		width: 700rpx;
		display: flex;
		align-items: center;
		padding: 20rpx 0;
		margin: 0 20rpx;
		color: #000000;
		border-radius: 20rpx;
		background-color: rgba(13, 202, 240, 0.8);
		border: 3rpx solid rgba(5, 98, 116, 0.8);

		.con_a {
			width: 500rpx;
			text-align: center;
			// background-color: #3ed343;
		}

		.con_b {
			// width: 180rpx;
			color: #ffffff;
			display: flex;
			align-items: center;
			// background-color: #ffff00;
		}
	}

	//选择断面列表
	.che_box {
		margin: 0rpx 0rpx 20rpx 0;
		padding: 20rpx;
		text-align: center;
		background-color: #33498d;
		color: #fff;
		border-radius: 10rpx;
		font-size: 40rpx;
	}

	.che_box_av {
		background-color: #1e2c55;
	}

	// 网络列表
	.box_net {
		margin-top: 30rpx;

		.box_t {
			margin-bottom: 20rpx;
			padding: 20rpx;
			border-radius: 20rpx;
			background-color: #f5f7f9;
			border: 5rpx solid #fff;
			box-shadow: 0 0 10rpx 5rpx rgba(183, 198, 221, 0.9);

			.ti {
				text-align: center;
				font-size: 45rpx;
				color: #000000;
			}

			.flx {
				display: flex;
				align-items: center;
				justify-content: space-between;
				line-height: 60rpx;

				.ie {
					color: #444444;
					width: 320rpx;

					.text {
						font-size: 40rpx;
						color: #5b4c95;
						font-weight: bold;
					}

				}
			}
		}
	}


	.hetop_box {
		border-radius: 20rpx;
		padding: 15rpx;
		margin-top: 30rpx;
		background-color: #ffffff;

		.titbox {
			text-align: center;
			padding: 10rpx;
			border-bottom: 1rpx solid rgba(122, 131, 166, 0.2);
			font-size: 40rpx;
			color: rgba(90, 118, 179, 0.9);
		}

		.titfosi {
			font-size: 35rpx;
		}

		.hetop {
			text-align: center;
			font-size: 40rpx;
			font-weight: bold;

			.titleclass {
				padding: 10rpx;
				border-bottom: 1rpx solid rgba(106, 113, 138, 0.1);
				color: #586ae8;
			}
		}
	}


	.homebox {
		padding: 0 20rpx;

		.czname {
			display: flex;
			justify-content: center;
			line-height: 100rpx;
			font-size: 40rpx;
		}

		.box_lo {
			color: #0c0f21;

			.czinput {
				font-size: 40rpx;
				margin: 20rpx 0;
				display: flex;
				align-items: center;

				.lebox {
					width: 280rpx;
				}

				.inputtext {
					width: 350rpx;
				}
			}
		}

		.button {
			padding: 0 30rpx 30rpx 30rpx;
		}

		.scroll-view_H {
			display: flex;
			align-items: center;
			justify-content: center;
			white-space: nowrap;
			width: 100%;

			.qicebox {
				display: flex;
				justify-content: center;
				align-items: center;
				font-size: 30rpx;
				width: 680rpx;

				.qicedian {
					width: 118rpx;
					text-align: center;
					color: #ffffff;
					background-color: #33498d;
					border: #33498d solid 1rpx;
					// border-radius: 10rpx 10rpx 0 0;
				}

				.qicinput {
					width: 118rpx;
					height: 60rpx;
					display: flex;
					align-items: center;
					justify-content: center;
					border: #33498d solid 1rpx;
					background-color: #ffffff;
				}

				.qicinone {
					width: 80rpx;
					text-align: center;
				}

				.junydu {
					width: 130rpx;
					text-align: center;
				}

				.jizhunqiany {
					width: 220rpx;
					text-align: center;
				}

				.xingzoujl {
					width: 150rpx;
					text-align: center;
				}

			}
		}

	}

	.decoration {
		width: 10rpx;
		height: 40rpx;
		border-radius: 15rpx;
		margin-right: 15rpx;
		background-color: #33498d;
	}
</style>
<style>
	page {
		background-color: #f2f1f6;
	}
</style>